package com.wkhyapp.lm.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wkhyapp.lm.R;
import com.wkhyapp.lm.http.vo.Notice;
import com.wkhyapp.lm.utils.DateUtil;
import com.wkhyapp.lm.utils.ImageLoadUtil;

import java.util.List;

/**
 * Created by Administrator on 2021-10-6.
 */

public class NoticeAdapter  extends BaseQuickAdapter<Notice, BaseViewHolder> {


    public NoticeAdapter(int layoutResId, List<Notice> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Notice item) {
        helper.setText(R.id.title_tv,item.getTitle());
        ImageView imageView = helper.getView(R.id.img_iv);
        ImageLoadUtil.setImage_Normal(mContext,item.getNoticeImg(),imageView);
        helper.setText(R.id.time_tv, DateUtil.timeStamp2Date(item.getCreateTime(),null));
    }
}
